#define  _CRT_SECURE_NO_WARNINGS
#include <vector>
#include <iostream>
using namespace std;

int main()
{
	int n;
	cin >> n;
	vector<vector<int>> ret(n);
	for (int i = 1; i <= n; i++)
		ret[i - 1].resize(i, 1);
	for (int i = 2; i < n; i++)
		for (int j = 1; j < i; j++)
			ret[i][j] = ret[i - 1][j - 1] + ret[i - 1][j];
	for (int i = 0; i < n; i++)
	{
		for (int j = 0; j <= i; j++)
			cout << ret[i][j] << " ";
		cout << endl;
	}
}